function [AllDataTraining, AllDataTesting, TrueLabelTraining, TrueLabelTesting] = Ddavid_pick_up_fold(AllData, TrueLabel, AllDataSampler, FoldNumber)

% [AllDataTraining, AllDataTesting, TrueLabelTraining, TrueLabelTesting] = Ddavid_pick_up_fold(AllData, TrueLabel, AllDataSampler, FoldNumber)
%
% <Input>
% AllData: [n*m], n is the size of dataset, m is the number of features
% TrueLabel: [n*k], n is the size of dataset, k is the number of labels
% AllDataSampler: [1*n], the cross-vaildation sampler
% FoldNumber: Integer, which fold to pick as testing data
%
% <Output>
% AllDataTraining: [(n - FoldSize) * m], FoldSize = n / the number of folds
% AllDataTesting: [FoldSize * m]
% TrueLabelTraining: [(n - FoldSize) * m]
% TrueLabelTesting: [FoldSize * m]

AllDataTraining = AllData(AllDataSampler ~= FoldNumber, :);
AllDataTesting = AllData(AllDataSampler == FoldNumber, :);
TrueLabelTraining = TrueLabel(AllDataSampler ~= FoldNumber, :);
TrueLabelTesting = TrueLabel(AllDataSampler == FoldNumber, :);
